package remote_work.client;

import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.SashForm;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;

public class StudentUI {
	
	private TabFolder tabFolder;
	
	public StudentUI(TabFolder tabFolder) {
		this.tabFolder = tabFolder;
	}

	/**
	 * @wbp.parser.entryPoint
	 */
	public void show() {
		TabItem tabItem_student = new TabItem(tabFolder, SWT.NONE);
		tabItem_student.addDisposeListener(new DisposeListener() {
			public void widgetDisposed(DisposeEvent arg0) {
				System.out.println("点击了tab");
			}
		});
		tabItem_student.setText("学生界面");
		
		Composite composite_2 = new Composite(tabFolder, SWT.NONE);
		tabItem_student.setControl(composite_2);
		composite_2.setLayout(new FillLayout(SWT.HORIZONTAL));
		
		SashForm sashForm_1 = new SashForm(composite_2, SWT.VERTICAL);
		
		Composite composite_4 = new Composite(sashForm_1, SWT.NONE);
		composite_4.setLayout(new GridLayout(9, false));
		
		Label label_16 = new Label(composite_4, SWT.NONE);
		label_16.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
		label_16.setText("选择课程：");
		
		Combo combo_5 = new Combo(composite_4, SWT.NONE);
		combo_5.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
		
		Button btnNewButton = new Button(composite_4, SWT.NONE);
		btnNewButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
		btnNewButton.setText("查询可用作业");
		new Label(composite_4, SWT.NONE);
		
		Button button_2 = new Button(composite_4, SWT.NONE);
		button_2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 1, 1));
		button_2.setText("下载作业");
		new Label(composite_4, SWT.NONE);
		
		Button btnNewButton_1 = new Button(composite_4, SWT.NONE);
		btnNewButton_1.setText("提交作业");
		new Label(composite_4, SWT.NONE);
		
		Button button_3 = new Button(composite_4, SWT.NONE);
		button_3.setText("取消提交");
		
		Composite composite_1 = new Composite(sashForm_1, SWT.NONE);
		composite_1.setLayout(new FillLayout(SWT.HORIZONTAL));
		
		SashForm sashForm_3 = new SashForm(composite_1, SWT.NONE);
		
		Composite composite_5 = new Composite(sashForm_3, SWT.NONE);
		composite_5.setLayout(new FillLayout(SWT.HORIZONTAL));
		
		Table table = new Table(composite_5, SWT.BORDER | SWT.FULL_SELECTION);
		table.setHeaderVisible(true);
		table.setLinesVisible(true);
		
		TableColumn tableColumn_1 = new TableColumn(table, SWT.NONE);
		tableColumn_1.setWidth(244);
		tableColumn_1.setText("可下载的作业");
		
		Composite composite_6 = new Composite(sashForm_3, SWT.NONE);
		composite_6.setLayout(new FillLayout(SWT.HORIZONTAL));
		
		Table table_2 = new Table(composite_6, SWT.BORDER | SWT.FULL_SELECTION);
		table_2.setHeaderVisible(true);
		table_2.setLinesVisible(true);
		
		TableColumn tblclmnNewColumn = new TableColumn(table_2, SWT.NONE);
		tblclmnNewColumn.setWidth(213);
		tblclmnNewColumn.setText("已下载的作业");
		
		Composite composite_8 = new Composite(sashForm_3, SWT.NONE);
		composite_8.setLayout(new FillLayout(SWT.HORIZONTAL));
		
		Table table_3 = new Table(composite_8, SWT.BORDER | SWT.FULL_SELECTION);
		table_3.setHeaderVisible(true);
		table_3.setLinesVisible(true);
		
		TableColumn tableColumn_7 = new TableColumn(table_3, SWT.NONE);
		tableColumn_7.setWidth(216);
		tableColumn_7.setText("已提交的作业");
		sashForm_3.setWeights(new int[] {1, 1, 1});
		sashForm_1.setWeights(new int[] {41, 576});
	}
}
